package com.sds.replicator.helpers;

import org.apache.commons.io.IOUtils;

import java.io.IOException;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: sdsbirdman
 * Date: 7/3/11
 * Time: 6:44 PM
 * To change this template use File | Settings | File Templates.
 */
public class Debugger {
    public static void dumpContent(byte[] data) throws IOException {
        System.out.flush();
        System.out.println("DEBUG----------------------");
        IOUtils.write(data, System.out);
        System.out.println("---------------------------");
        System.out.flush();
    }

    public static void dumpMap(Map<String, String> strings) {
        System.out.flush();
        System.out.println("DEBUG----------------------");
        for (String s : strings.keySet()) {
            System.out.printf("%s='%s'\n", s, strings.get(s));
        }
        System.out.println("---------------------------");
        System.out.flush();
    }
}
